import { RouteRecordRaw } from 'vue-router'
const route = [
  {
    path: '/',
    name: 'layout',
    redirect: '/home',
    component: () => import('@/components/Layout/index.vue'),
    children: [
      {
        path: 'home',
        name: 'home',
        component: () => import('@/views/Home/index.vue'),
      },
      {
        path: 'editInfo',
        name: 'editInfo',
        component: () => import('@/views/EditInfo/index.vue'),
      },
      {
        path: 'writeArticle',
        name: 'writeArticle',
        component: () => import('@/views/Article/writeArticle.vue'),
      },
      {
        path: 'column',
        name: 'column',
        redirect: '/home',
        component: () => import('@/views/Column/index.vue'),
        children: [
          {
            path: 'list/:columnId',
            name: 'columnList',
            component: () => import('@/views/Column/list.vue'),
          },
          {
            path: 'detail/:columnId/:articleId',
            name: 'columnDetail',
            component: () => import('@/views/Column/detail.vue'),
          },
        ],
      },
    ],
  },
  {
    path: '/signIn/:type',
    name: 'signIn',
    component: () => import('@/views/SignIn/index.vue'),
  },
] as RouteRecordRaw[]
export default route
